/* 全局样式 */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('https://img.shetu66.com/2022/11/04/1667562774577428.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: -1;
}

/* 导航栏样式 */
.navbar {
    background-color: #3b82f6;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.main-content {
    display: flex;
    min-height: calc(100vh - 56px);
    padding: 2rem;
    justify-content: center;
    align-items: center;
}

.guide-steps {
    width: 15%;
    min-width: 150px;
    text-align: left;
    padding: 1.2rem;
    background-color: white;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-right: 2rem;
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.guide-steps .section-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.guide-steps ol {
    list-style-type: decimal;
    padding-left: 1.25rem;
    line-height: 1.5;
    font-size: 1rem;
}

.center-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.main-title {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.description {
    color: #6b7280;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-bar input {
    width: 70%;
    max-width: 500px;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-right: none;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-bar button {
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-bar button:hover {
    background-color: #2563eb;
}

.feature-intro {
    text-align: center;
    width: 100%;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.feature-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: calc(33.333% - 1rem);
    min-width: 250px;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: scale(1.05);
}

.feature-item i {
    font-size: 2rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #6b7280;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
}

@media (min-width: 768px) {
    .search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .search-results {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.food-card {
    background-color: white;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.food-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
}

.food-card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.food-card .card-content {
    padding: 1rem;
}

.food-card .card-content h2 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.food-card .card-content button {
    background-color: #3b82f6;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.food-card .card-content button:hover {
    background-color: #2563eb;
}

.ingredient-card {
    background-color: #e5e7eb;
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.ingredient-card img {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    margin-right: 0.5rem;
}

.ingredient-card h3 {
    font-size: 1rem;
    font-weight: bold;
}

.ingredient-card p {
    color: #6b7280;
}

/* 轮播图样式 */
.carousel {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.carousel img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: none;
    transition: opacity 0.5s ease;
}

.carousel img.active {
    display: block;
}

.carousel button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel .prev-btn {
    left: 1rem;
}

.carousel .next-btn {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.carousel-indicators span {
    width: 0.75rem;
    height: 0.75rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicators span.active {
    background-color: #3b82f6;
}